package org.example.blogserver.user.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.example.blogpojo.user.domain.User;
import org.example.blogpojo.user.query.UserQuery;
import org.mybatis.spring.annotation.MapperScan;

import java.util.List;

@Mapper
public interface UserMapper {
    //@Select("select * from tb_user")
    List<User> getAllUser();

    @Select("select * from tb_user where id=#{id}")
    User getUserById(Long id);

    List<User> queryPage(UserQuery userQuery);

    void insertUser(User user);

    void updateUser(User user);

    void deleteUser(Long id);

    void deleteUserByIds(Long[] ids);
}
